Skip to content

Fix ArtifactEngine CI test failures by updating nock to v14#1352

Open
v-abhishera wants to merge 2 commits intomasterfrom
users/v-abhishera/ArtifactEngineCIChecksfix
Open

Fix ArtifactEngine CI test failures by updating nock to v14#1352
v-abhishera wants to merge 2 commits intomasterfrom
users/v-abhishera/ArtifactEngineCIChecksfix

Conversation

@v-abhishera
Copy link
Copy Markdown
Contributor

@v-abhishera v-abhishera commented Apr 10, 2026

Description:

Summary

The ArtifactEngine integration tests fail in CI because nock@9.1.0 is incompatible with Node 24's stricter stream type checking. This PR updates nock to v14 and fixes related test issues.

Root Cause

The CI pipeline uses Node 24 (azure-pipelines-extensions.yml). nock@9.1.0 relies on internal Node stream APIs that changed in Node 24, causing TypeError crashes in all nock-based integration tests.

Changes

File Change
package.json nock: 9.1.0^14.0.6
jenkinsTests.ts Added nock.disableNetConnect() + nock.enableNetConnect('127.0.0.1') with comment in beforeEach
proxyTests.ts Replaced unreachable redvstt-lab43:8080 with 127.0.0.1:9011; replaced 2x deprecated new Buffer() with Buffer.from()
package-lock.json Regenerated

Detail

  1. nock 9.1.0^14.0.6 — nock v9 uses Node stream internals incompatible with Node 24.

  2. nock.disableNetConnect() / nock.enableNetConnect('127.0.0.1') — Required by nock v14's stricter interceptor model. Localhost is allowed so proxy tests (which use a real local server on 127.0.0.1:9011) sharing the same mocha process are not blocked.

  3. redvstt-lab43:8080127.0.0.1:9011 — The old hostname was a decommissioned dev machine. The proxy test spins up its own local server on port 9011, so the endpoint URL should point there.

  4. new Buffer()Buffer.from()Buffer() constructor is deprecated since Node 6 and removed in newer versions.

Testing

  • All 60 ArtifactEngine tests passing locally (gulp build && gulp test --suite=ArtifactEngine)
  • CI checks passing (all 9 green)

Risk Assessment

Low — devDependency + test-only changes. No production code affected.

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@v-abhishera v-abhishera marked this pull request as ready for review April 14, 2026 11:26
@v-abhishera v-abhishera requested review from a team as code owners April 14, 2026 11:26
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant